<?php

namespace app\crontab\task;

use app\admin\logic\mqlogic\DelayExchangeConsumer;
use app\admin\logic\RateService;


/**
 * 众包费
 *
 * @icon fa fa-circle-o
 */
class MqDelayConsumer extends Common
{
    private static $queue = 'delay_queue';
    public function __construct(array $params = [])
    {
        parent::__construct($params);
    }
    public function consumer() {
        try {
            $config = config('site.rabitmqconfig');
            $objConsumer = new DelayExchangeConsumer($config);
            $objConsumer->setQueue(self::$queue)->consume();
        } catch (\Exception $e) {
            doLog($e->getMessage(), 'mqdelayconsumer');exit;
        }

        echo 'finish';exit;
    }
}
